//
//  PackageTimeSelectCell.m
//  DingDongXiChe
//
//  Created by wtjr on 2017/11/27.
//  Copyright © 2017年 xieyingze. All rights reserved.
//

#import "PackageTimeSelectCell.h"
#import "ServiceTimePickerView.h"

@interface PackageTimeSelectCell()

@property (nonatomic, strong) UIView *mainView;

@end

@implementation PackageTimeSelectCell

+ (instancetype)cellWithTableView:(UITableView *)tableView indexPath:(NSIndexPath *)indexPath {
    static NSString *cellId = @"PackageTimeSelectCell";
    PackageTimeSelectCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (cell == nil) {
        cell = [[PackageTimeSelectCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
    }
    return cell;
}

#pragma mark - Init

- (void)initSubView {
    [self addSubview:self.mainView];
}

- (void)autoLayoutSubviews {
    [self.mainView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(@0);
    }];
}

#pragma mark - Setter


#pragma mark - Getter

- (UIView *)mainView {
    if (!_mainView) {
        _mainView = [UIView new];
        
        ServiceTimePickerView *pickerView = [ServiceTimePickerView new];
        self.pickerView = pickerView;
        [_mainView addSubview:pickerView];
        [pickerView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(@0);
        }];
    }
    return _mainView;
}
@end
